package leetcode.code136.SingleNumber;

import leetcode.helper.HelpDebug;

public abstract class SingleNumber implements ISingleNumber {

	@Override
	public void debug1() {
		int[] nums = new int[] { 2, 2, 1 };
		int expect = 1;
		HelpDebug.printInputs(expect, new Object[] { nums });
		int result = this.debug(nums);
		HelpDebug.printObject(result);
	}

	@Override
	public void debug2() {
		int[] nums = new int[] { 4, 1, 2, 1, 2 };
		int expect = 4;
		HelpDebug.printInputs(expect, new Object[] { nums });
		int result = this.debug(nums);
		HelpDebug.printObject(result);
	}

	@Override
	public void debug3() {
		int[] nums = new int[] { 1 };
		int expect = 1;
		HelpDebug.printInputs(expect, new Object[] { nums });
		int result = this.debug(nums);
		HelpDebug.printObject(result);
	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

	@Override
	abstract public int singleNumber(int[] nums);

	@Override
	public int debug(int[] nums) {
		return this.singleNumber(nums);
	}

}
